package com.cloud.clouduser;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpSession;

@SpringBootApplication
@EnableEurekaClient
@RestController
public class CloudUserApplication {

    public static void main(String[] args) {
        SpringApplication.run(CloudUserApplication.class, args);
    }

    @RequestMapping("/login.do")
    public String login(){
        return "login ---~~~!! ";
    }

    @RequestMapping("/casue.do")
    public String casue(){
        return "casue ---~~~!! ";
    }

    @RequestMapping("/logout.do")
    public String mylogout(HttpSession session){
        session.invalidate();
        return "mylogout";
    }

    @RequestMapping("/loginSuccess.do")
    public String loginSuccess(){
        return "loginSuccess!!!";
    }

    @RequestMapping("/noSuccess.do")
    public String noSuccess(){
        return "noSuccess!!!";
    }

    @RequestMapping("/resources/get")
    public String resourceGet(){
        return "/resources/get";
    }

}
